Skip to content

feat(release-tag): recover a release whose main push produced no run - #111

Merged
Andreas-Garcia merged 5 commits into
mainfrom
feat/release-pr-recovery-dispatch
Dec 2, 2026
Merged

Andreas-Garcia merged 5 commits into
mainfrom
feat/release-pr-recovery-dispatch

Conversation

@Andreas-Garcia

Copy link
Copy Markdown
Member

Summary

A release tag only exists if a push run on main saw before..after. When GitHub creates no run for that push, nothing can be re-run, manual tags are forbidden by ruleset, and release-please stays blocked on the merged release PR. Callers can now dispatch their workflow with a release-commit SHA, which replays parent..commit through the unchanged validate-release.py.

Issues

Refs #107

Changes

  • release/release-range.py (new): resolves the validated range for a push or a dispatch. A dispatched commit must be a full SHA, have exactly one parent and be on the first-parent history of origin/main.
  • release-tag.yml, release-please.yml, publish-python.yml: accept a workflow_dispatch on main with a non-empty release-commit; publish-python.yml checks out the release commit and fails unless the tag points at it.
  • reconcile-release-prs.py: a missing tag error prints the gh workflow run recovery command.
  • conformance/check-concurrency.sh: event-form workflows declaring the release-commit input also accept <stem>-${{ inputs.release-commit || github.sha }}; the github.sha group stays valid.
  • python-check.yml: new optional ref input so that a release gate can check the dispatched commit.
  • Examples, README and CONTRIBUTING document the trigger, group and recovery.

Test plan

  • python3 -m unittest discover -s release -p 'test_*.py': 135 tests pass (venv with build twine setuptools wheel).
  • bash .github/tests/check-concurrency.sh, bash .github/tests/examples.sh: pass.
  • shellcheck on the two concurrency scripts, actionlint: pass.
  • The dispatch run itself cannot be exercised before release; see Post-deploy verification.

Screenshots

N/A

Risk

Intent change, depth deep: shared release, tagging and publication workflows, and a new caller contract. Not breaking: existing callers keep working without the trigger. Review findings are fixed in this PR; none awaits a decision. Remaining limitation: the workflow-file 403 described under Post-deploy verification, with a documented workaround and no permission change.

How to revert

Revert the squash merge. Callers pinned to the previous release are unaffected.

Deployment notes

Before any caller adopts the new group: update its org-conformance checker pin, and merge the matching change to scripts/check-workflow-concurrency.sh in github-config. Caller pin bumps (including .github/workflows/release.yml here, intentionally unchanged) follow the release; caller-owned jobs must check out inputs.release-commit || github.sha.

Post-deploy verification

After the release, on release-automation-sandbox-20261106: bump the pin, then dispatch an already tagged release commit (expected: existing tag, green run) and a commit without a bump (expected: release=false, no tag). Also recover an untagged release commit after a later change under .github/workflows/: GitHub may refuse the tag or Release with a 403 because no token holds the workflows permission (community-reported, unverified for the release App); the README gives the temporary-branch workaround. Tracked in #107.

🤖 Generated with Claude Code

Andreas-Garcia and others added 4 commits December 2, 2026 19:46
A release tag only exists if a push run saw before..after. When GitHub creates
no run, nothing can be re-run and release-please stays blocked. Callers can now
dispatch the release-commit input, which replays parent..commit through the same
validation.

Refs #107

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…document recovery limits

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ter one

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Andreas-Garcia
Andreas-Garcia enabled auto-merge (squash) December 2, 2026 18:57
@Andreas-Garcia
Andreas-Garcia merged commit 19ffb00 into main Dec 2, 2026
4 checks passed
@Andreas-Garcia
Andreas-Garcia deleted the feat/release-pr-recovery-dispatch branch December 2, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant